﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using ProjectWebNhac.BUS;

namespace ProjectWebNhac.GUI.Admin
{
    public partial class Login : System.Web.UI.Page
    {
        AdminBus adbus= new AdminBus();
        protected void Page_Load(object sender, EventArgs e)
        {

            Session["Admin"] = "";
        }

        protected void lnklogin_Click(object sender, EventArgs e)
        {
            string taikhoan = txtTaiKhoan.Text;
            string matkhau = txtMatKhau.Text;
            DataTable dt = adbus.adminlogin(taikhoan, matkhau);
            Session["Admin"] = taikhoan.ToString();
            if (dt.Rows.Count > 0)
                Response.Redirect("QL-BaiHat.aspx");
            else
                lbThongBao.Text = "Đăng Nhập Không Thành Công";
        }
    }
}